package com.xiang.utils;

import java.io.Serializable;

import com.xiang.activity.DealDetailActivity;
import com.xiang.activity.DealHTML5Activity;
import com.xiang.activity.FindDealsActivity;
import com.xiang.activity.GetCitiesActivity;
import com.xiang.activity.GetRegionsActivity;
import com.xiang.constant.DealBaseInfo;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

public class ActivityJumpUril {
	/**
	 * 城市列表页面到城市下区域页面
	 */
	public static void citiesActivityToRegionsActivity(Context context, String city) {
		Intent intent = new Intent(context, GetRegionsActivity.class);
		intent.putExtra("city_name", city);
		context.startActivity(intent);
	}
	/**
	 * 获取团购信息页到城市选择页
	 * @param context
	 */
	public static void findDealToGetCities(Context context) {
		Intent intent = new Intent(context, GetCitiesActivity.class);
		context.startActivity(intent);
	}
	/**
	 * 团购信息页到团购详情页
	 * @param context
	 */
	public static void findDealToDealDetail(Context context, DealBaseInfo baseinfo) {
		Intent intent = new Intent(context, DealDetailActivity.class);
		Bundle bundle = new Bundle();
		bundle.putSerializable("dealBaseInfo",  (Serializable) baseinfo);
		intent.putExtra("bundle", bundle);
		context.startActivity(intent);
	}
	/**
	 * 团购详情页到团购页
	 */
	public static void detailToHtml5Page(Context context, String url) {
		Intent intent = new Intent(context, DealHTML5Activity.class);
		intent.putExtra("url", url);
		context.startActivity(intent);
	}
	/**
	 * 引导页到获取团购信息页
	 */
	public static void launchToFindDeal(Context context) {
		Intent intent = new Intent(context, FindDealsActivity.class);
		context.startActivity(intent);
	}
	
}
